function onlyNumberAllowed(name) {
	var isi = document.getElementsByName(name)[0].value;
	while (!isNumber(isi)) {
		isi = isi.substring(0, isi.length - 1);
	}
	document.getElementsByName(name)[0].value = isi;
}

function cekMaxLength(name, maxSize) {
	var isi = document.getElementsByName(name)[0].value;
	while (isi.length > maxSize) {
		isi = isi.substring(0, maxSize);
	}
	document.getElementsByName(name)[0].value = isi;
}

function isNumber(isi) {
	return !isNaN(isi);
}

function checkFile(path) {
	var fileName = new Array();
	fileName = path.split(".");
	if (fileName[fileName.length - 1] == 'xls') {
		return true;
	} else {
		return false;
	}
}